{extend name="common/base" }

{block name="style"}
<style type="text/css">
.nd-group-select{
	color: #3bb4f2 !important;
}
</style>
{/block}

{block name="content"}
<div class="am-g">
	<div class="am-u-sm-12 am-u-md-6">
		<div class="am-btn-toolbar">
			<div class="am-btn-group am-btn-group-xs">
				<a class="am-btn am-btn-default" href="{:url('add')}">
					<span class="am-icon-plus"></span> 新增
				</a>
				<a class="am-btn am-btn-default nd-refresh">
					<span class="am-icon-refresh"></span> 刷新
				</a>
			</div>
		</div>
	</div>
</div>
<br/>

<div class="am-g">
	<div class="am-u-sm-12">
		<table class="am-table am-table-striped am-table-radius am-table-bordered nd-sorted-table" sort-action="{:url('sort')}">
			<thead>
				<tr>
					<th>名称</th>
					<th>描述</th>
					<th>排序</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
			{volist name="_list" id="vo"}
				<tr class="nd-sorted-item" data-id="{$vo.id}">
					<td class="am-text-middle">
						<span class="am-icon-list-ul nd-sorted-handle"></span>
						{$vo.group_name}
					</td>
					<td class="am-text-middle">{$vo.group_info}</td>
					<td class="am-text-middle">{$vo.group_sort}</td>
					<td class="am-text-middle">
						<div class="am-btn-toolbar">
							<div class="am-btn-group am-btn-group-xs">
								{$widget->row('button', ['title' => '编辑', 'class' => 'am-text-secondary', 'icon' => 'am-icon-pencil-square-o', 'url' => url('edit', ['id' => $vo['id']])])}
                                {$widget->row('button', ['title' => '删除', 'class' => 'am-text-danger ajax-get ajax-confirm', 'icon' => 'am-icon-trash-o', 'url' => url('delete', ['id' => $vo['id']])])}
							</div>
						</div>
					</td>
				</tr>
			{/volist}
			</tbody>
		</table>
	</div>
</div>
{/block}